<?php 
namespace Admin\Controller;
class MemberController extends BaseController{
	//会员列表
	function member_list(){
		$memberOb=M('member');
		$member_list=$memberOb->where("deleted = '1'")
					->select();
		$this->assign('member_list',$member_list);
		$this->display();
	}
	function member_del(){
		$id=$_GET['id'];
		$memberOb=M('member');
		$data=array(
			'deleted'=>'0',
			);
		$member_del=$memberOb->where("id=$id")
							->data($data)
							->save();

		if($member_del){
			echo $id;
		}
	}
	//管理员删除的会员记录
	function member_toTrush(){
		$memberOb=M('member');
		$member_toTrush=$memberOb->where("deleted='0'")
								->select();
		$this->assign('member_toTrush',$member_toTrush);
		$this->display();
	}	
		//会员还原
		function member_reduct(){
		$id= $_GET['id'];
		$memberOb=M('member');
		$data=array(
			'deleted'=>'1',
			);
		$member_reduct=$memberOb->where("id=$id")
								->data($data)
								->save();
		if($member_reduct){
			echo $id;
		}
	}
	//会员浏览记录
	function member_browse(){
		$this->display();	
	}
	//会员分享
	function member_share(){
		$this->display();
	}
	//会员等级
	function member_level(){
		$this->display();
	}
	//会员下载记录
	function member_download(){
		$this->display();
	}
	//会员积分
	function member_score(){
		$this->display();
	}
	function member_start(){
		$id=$_GET['id'];
		$memberOb=M('member');
		$data=array(
			'use_status'=>'1'	
			);	 
		$member_start=$memberOb->where("id=$id")
					->data($data)
					->save();
		if($member_start){
			echo $id;
		}
	}
		function member_stop(){
		$id=$_GET['id'];
		$memberOb=M('member');
		$data=array(
			'use_status'=>'0',	
			);
		$member_start=$memberOb->where("id=$id")
					->data($data)
					->save();
		if($member_start){
			echo $id;
		}
	}
	function member_add(){
		$this->display();
	}
}
